package com.base.system.mybatisPlus.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 权限表
 * </p>
 *
 * @author 木木
 * @since 2020-04-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("permission")
public class MybatisPermission extends Model<MybatisPermission> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键，自动生成
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String createBy;

    private LocalDateTime createTime = LocalDateTime.now();

    private LocalDateTime lastUpateTime = LocalDateTime.now();

    private String updateBy;

    /**
     * 权限中文名称
     */
    private String nameZh;

    /**
     * 权限中文描述
     */
    private String note;

    /**
     * 权限key(大小写字母，数字，英文下划线)
     */
    private String perkey;

    /**
     * 页面上是否可修改
     */
    private Boolean isEdit = false;


    @Override
    protected Serializable pkVal() {
        return id;
    }

}
